top_builddir = ../..
srcdir = @srcdir@
top_srcdir = @top_srcdir@
include ../../Makefile.common

all: gfx.$(SLEXT)

gfx.$(O): gfx.c 
	$(C) $(RUBY_CPPFLAGS) -Wall -Wno-unused -fPIC -c gfx.c -o gfx.$(O)

GFX_DEPS=../libgfxpdf$(A) ../libgfxswf$(A)  ../librfxswf$(A) ../libgfx$(A) ../libbase$(A) 
gfx.$(SLEXT): gfx.$(O) $(GFX_DEPS) Makefile
	$(L) $(RUBY_LDFLAGS) $(SHARED) gfx.$(O) -o gfx.$(SLEXT) $(GFX_DEPS) $(PYTHON_LIB) $(LIBS) $(RUBY_LIBS) $(CXXLIBS)

clean:
	rm -f *.o *.$(O) *.$(SLEXT) *.so

INSTALL_LIB = echo installing $$file to $(RUBY_INSTALLDIR);$(INSTALL_PROGRAM) $$file $(RUBY_INSTALLDIR)
UNINSTALL_LIB = rm -f $(RUBY_INSTALLDIR)/$$file
install:
	@file=gfx.$(SLEXT); if test -f $$file;then $(INSTALL_LIB);fi

uninstall:
	@file=gfx.$(SLEXT); $(UNINSTALL_LIB)

.PHONY: all
